package com.micai.springboot.task;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 描述：线程任务
 * <p>
 *
 * @author: 赵新国
 * @date: 2018/4/10 18:06
 */
public class RunnableTask1 implements Runnable {

    private final Logger logger = LoggerFactory.getLogger(getClass());

    @Override
    public void run(){
        synchronized (this){
            try {
                for (int i = 1;i <= 100;i++){
                    System.out.println("=========》当前线程名：" + Thread.currentThread().getName()+"----------异步：>"+i);
                    Thread.sleep(200);
                }
            }catch (Exception ex){
                ex.printStackTrace();
            }
        }
    }

}
